<h1>Editing product</h1>

<%= error_messages_for :product %>

<% form_for(@product,:url => {:action=>'update',:id=>@product}) do |f| %>
  <p>
    <b>Name</b><br />
    <%= f.text_field :name %>
  </p>

  <p>
    <b>Desc</b><br />
    <%= f.text_area :desc %>
  </p>

  <p>
    <b>Img url</b><br />
    <%= f.text_field :img_url %>
  </p>
<p><b>Price</b><br/>
<%= f.text_field :price  %></p>
  <p>
    <%= f.submit "Update" %>
  </p>
<% end %>

<%= link_to 'Show', :action=>'show', :id=>@product %> |
<%= link_to('Back', :action=>'index')%>
